<template>
  <div>
    <el-tabs>
      <el-tab-pane label="申请书">
        <application-view :isPerson="isPerson" :relatedData="relatedData"></application-view>
      </el-tab-pane>
      <el-tab-pane label="承诺书">
        <commitment-view :isPerson="isPerson" :queryId="queryId"></commitment-view>
      </el-tab-pane>
      <el-tab-pane label="反担保人承诺书">
        <counter-commitment :isPerson="isPerson" :queryId="queryId"></counter-commitment>
      </el-tab-pane>
      <el-tab-pane label="征信查询书">
        <credit-search :isPerson="isPerson" :relatedData="relatedData"></credit-search>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import ApplicationView from '@/credit/views/county/unionProvince/components/ApplicationView'
import CommitmentView from '@/credit/views/county/unionProvince/components/CommitmentView'
import CounterCommitment from '@/credit/views/county/unionProvince/components/CounterCommitment'
import CreditSearch from '@/credit/views/county/unionProvince/components/CreditSearch'
export default {
  components: {
    ApplicationView,
    CommitmentView,
    CounterCommitment,
    CreditSearch,
  },
  props: {
    relatedData: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {}
  },
  computed: {
    isPerson() {
      return +this.relatedData.customer_type === 2
    },
    queryId() {
      return this.relatedData.customer_related_id
    },
  },

  created() {},
  methods: {},
}
</script>
<style lang="scss" scoped></style>
